import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {AuthComponent} from "./auth/auth.component";

const  adminModule = ()=>
  import('./admin/admin.module').then(module => module.AdminModule); //懒加载


const routes: Routes = [
  {
    path: 'admin',
    loadChildren: adminModule
  },
  {
    path: 'auth',
    component: AuthComponent
  },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
